<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>变量</title>
</head>

<body>


  <script>
    // 变量
    let name = '小明'
    let age = 18

    // + 拼接
    console.log(name + age + '岁了')

    // 模板字符串
    console.log(`我是${name}，今年${age}岁了`)

    // 常量
    const PI = 3.14
    console.log('圆周率是' + PI)

    const info = {
      name: 'wsj',
      age: 18
    }
    info.age = 19
    console.log(info)
  </script>
</body>

</html>